//
//  SecureFieldView.swift
//  SwiftUIDemo
//
//  Created by Kael on 2019/12/8.
//  Copyright © 2019 Kael. All rights reserved.
//

import SwiftUI

struct SecureFieldView: View {
    
    @State var testName = "kael"
    
    var body: some View {
        HStack {
            Text("密码:")
                .foregroundColor(.orange)
            SecureField("kael", text: self.$testName)
                .frame(height: 50)
                .padding(5)
                .textFieldStyle(RoundedBorderTextFieldStyle())
                .background(Color.green)
                .padding(20)
                .background(Color.yellow)
                .padding(30)
                .background(Color.red)
                .padding(10)
                .background(Color.orange)

            
            Text("+")
                .font(.title)
                .foregroundColor(.white)
                .background(Color.red)
                .padding()
                .background(Color.blue)
        }
    }
}

struct SecureFieldView_Previews: PreviewProvider {
    static var previews: some View {
        SecureFieldView()
    }
}
